/**
 * Created by tanbingqin on 2019/10/31.
 */
import config from 'config'
import httpFetch from 'share/httpFetch'
import errorMessage from 'share/errorMessage'

export default {
  //获取消费记录列表
  getExpenseRecordList(page, size, searchParams){
    return httpFetch.post(`${config.baseUrl}/api/controlled/order/get/finance/bank/order/list?page=${page}&size=${size}`, searchParams)
  },

  //获取可关联的还款单
  getRefundList(params){
    return httpFetch.get(`${config.baseUrl}/api/repayment/query/by/command`, params)
  },

  //设置关联的还款单
  setRefundRelate(params){
    return httpFetch.post(`${config.baseUrl}/api/controlled/order/ref/repayment/list`, params)
  },

  retryCreateLoan(id){
    return httpFetch.post(`${config.baseUrl}/api/controlled/order/retry/create/loan/bill?bankOrderId=${id}`)
  },

  retryCreateRefund(id){
    return httpFetch.post(`${config.baseUrl}/api/controlled/order/retry/create/repayment?bankOrderId=${id}`)
  }
}
